<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableOrder extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
       public function up()
    {
        //创建表   order是你的表名        
        Schema::create('order', function (Blueprint $table) {            
            //increments  string  timestamps 类型            
            $table->increments('id');            
            $table->string('order_num');            
            $table->string('user_id');            
            $table->string('address_id');
            $table->string('total');
            $table->string('pay');
            $table->string('logistics');
            $table->string('status');
            $table->timestamp('created_at')->nullable();
        });                
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //删除表        
        Schema::drop('order'); 
    }
}

